/*
 * Copyright (c) 2024-2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION!

import { int32, int64, float32 } from "@koalaui/common"
import { KInt, KPointer, KBoolean, KStringPtr, wrapCallback } from "@koalaui/interop"
import { NodeAttach, remember } from "@koalaui/runtime"
import { TextOverflow, HitTestMode, ImageSize, Alignment, BorderStyle, ColoringStrategy, HoverEffect, Color, Visibility, ItemAlign, Direction, GradientDirection, ObscuredReasons, RenderFit, ImageRepeat, Axis, ResponseType, FunctionKey, ModifierKey, PixelRoundCalcPolicy, Curve, PlayMode, TransitionType, HorizontalAlign, VerticalAlign, ClickEffectLevel, SharedTransitionEffectType, Placement, ArrowPointPosition, MouseButton, MouseAction, TouchType, KeyType, KeySource, FontWeight, FontStyle, TextAlign, TextCase, CopyOptions, TextHeightAdaptivePolicy, WordBreak, LineBreakStrategy, EllipsisMode, TextSelectableMode, TextDecorationType, TextDecorationStyle, ImageSpanAlignment, ImageFit } from "./ArkEnumsInterfaces"
import { Resource } from "./ArkResourceInterfaces"
import { TextController } from "./ArkTextControllerMaterialized"
import { CommonMethod, Rectangle, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, VisualEffect, Filter, BorderImageOption, OutlineStyle, AccessibilityCallback, AnimateParam, TransitionOptions, MotionBlurOptions, InvertOptions, TranslateOptions, ScaleOptions, RotateOptions, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, UniformDataType, CustomBuilder, DragItemInfo, MotionPathOptions, ShadowOptions, ShadowStyle, CircleShape, EllipseShape, PathShape, RectShape, StateStyles, PixelStretchEffectOptions, BackgroundBrightnessOptions, GestureRecognizerJudgeBeginCallback, ShouldBuiltInRecognizerParallelWithCallback, SizeChangeCallback, SafeAreaType, SafeAreaEdge, BlurStyle, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, TransitionFinishCallback, BlurOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, ComponentContent, OverlayOptions, BlendMode, BlendApplyType, Blender, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ModalTransition, ContentCoverOptions, SheetOptions, VisibleAreaChangeCallback, DrawContext, TouchTestInfo, TouchResult, AdaptiveColor, BlurStyleActivePolicy, RepeatMode, LinearGradient_common, FinishCallbackType, ExpectedFrameRateRange, TransitionEffects, TransitionEdge, MotionBlurAnchor, LocalizedHorizontalAlignParam, LocalizedVerticalAlignParam, PreDragStatus, ShadowType, UIGestureEvent, BlurStyleOptions, ThemeColorMode, FractionStop, DragPreviewMode, ImageModifier, OverlayOffset, TransitionHierarchyStrategy, PopupMessageOptions, SymbolGlyphModifier, MenuPreviewMode, ContextMenuAnimationOptions, BindOptions, SheetSize, SheetType, SheetTitleOptions, SheetMode, ScrollSizeMode, UIContext, SheetKeyboardAvoidMode, SourceTool, RectResult, TouchTestStrategy, EventTarget, SourceType, TouchObject, HistoricalPoint, IntentionCode, DragBehavior, Summary, DragResult, DismissPopupAction, AnimationRange, DismissContentCoverAction, SheetDismiss, DismissSheetAction, SpringBackAction, DismissReason } from "./ArkCommonInterfaces"
import { Length, SizeOptions, ConstraintSizeOptions, ChainWeightOptions, Padding, LocalizedPadding, Margin, LocalizedMargin, ResourceColor, Position, BorderOptions, EdgeStyles, EdgeWidths, LocalizedEdgeWidths, EdgeColors, LocalizedEdgeColors, BorderRadiuses, LocalizedBorderRadiuses, OutlineOptions, EdgeOutlineStyles, Dimension, EdgeOutlineWidths, OutlineRadiuses, Edges, LocalizedEdges, LocalizedPosition, ResourceStr, AccessibilityOptions, PX, VP, FP, LPX, Percentage, ColorMetrics, Area, Bias, Font } from "./ArkUnitsInterfaces"
import { DrawModifier } from "./ArkDrawModifierMaterialized"
import { LengthMetrics } from "./ArkLengthMetricsMaterialized"
import { ResizableOptions, DrawingLattice } from "./ArkImageInterfaces"
import { FocusBoxStyle, FocusPriority } from "./ArkFocusInterfaces"
import { TransitionEffect } from "./ArkTransitionEffectMaterialized"
import { ProgressMask } from "./ArkProgressMaskMaterialized"
import { AttributeModifier } from "./handwritten"
import { GestureModifier } from "./ArkGestureModifierMaterialized"
import { PixelMap } from "./ArkPixelMapMaterialized"
import { GestureType, GestureMask, TapGestureInterface, LongPressGestureInterface, PanGestureInterface, PinchGestureInterface, SwipeGestureInterface, RotationGestureInterface, GestureGroupInterface, GestureInfo, GestureJudgeResult, GestureInterface, TapGestureParameters, PanDirection, SwipeDirection, GestureMode, GestureHandler, GesturePriority, FingerInfo } from "./ArkGestureInterfaces"
import { LengthUnit, RectWidthStyle, RectHeightStyle } from "./ArkArkuiExternalInterfaces"
import { ClickEvent } from "./ArkClickEventMaterialized"
import { HoverEvent } from "./ArkHoverEventMaterialized"
import { MouseEvent } from "./ArkMouseEventMaterialized"
import { TouchEvent } from "./ArkTouchEventMaterialized"
import { KeyEvent } from "./ArkKeyEventMaterialized"
import { ICurve } from "./ArkICurveMaterialized"
import { DragEvent } from "./ArkDragEventMaterialized"
import { BaseGestureEvent } from "./ArkBaseGestureEventMaterialized"
import { PanGestureOptions } from "./ArkPanGestureOptionsMaterialized"
import { BaseEvent } from "./ArkBaseEventMaterialized"
import { UnifiedData } from "./ArkUnifiedDataMaterialized"
import { GestureControl } from "./ArkGestureControlNamespace"
import { GestureEvent } from "./ArkGestureEventMaterialized"
import { DecorationStyleInterface, StyleOptions, StyledStringKey, SpanStyle, ImageAttachmentLayoutStyle, ImageAttachmentInterface, CustomSpanMeasureInfo, CustomSpanMetrics, CustomSpanDrawInfo, StyledStringValue } from "./ArkStyledStringInterfaces"
import { TextDataDetectorConfig, FontSettingOptions, TextDataDetectorType, TextMenuItem, TextRange, MenuType, PositionWithAffinity, LineMetrics, TextBox, Affinity } from "./ArkTextCommonInterfaces"
import { EditMenuOptions } from "./ArkEditMenuOptionsMaterialized"
import { SelectionMenuOptions, MenuOnAppearCallback } from "./ArkRichEditorInterfaces"
import { TextMenuItemId } from "./ArkTextMenuItemIdMaterialized"
import { StyledString } from "./ArkStyledStringMaterialized"
import { LayoutManager } from "./ArkLayoutManagerMaterialized"
import { ImageAttachment } from "./ArkImageAttachmentMaterialized"
import { CustomSpan } from "./ArkCustomSpanMaterialized"
export interface TextOverflowOptions {
    overflow: TextOverflow;
}
export type TextInterface = (content?: string | Resource, value?: TextOptions) => TextAttribute;
export interface TextAttribute extends CommonMethod<TextAttribute> {
    font: Font;
    fontColor: ResourceColor;
    fontSize: number | string | Resource;
    minFontSize: number | string | Resource;
    maxFontSize: number | string | Resource;
    minFontScale: number | Resource;
    maxFontScale: number | Resource;
    fontStyle: FontStyle;
    fontWeight: number | FontWeight | string;
    lineSpacing: LengthMetrics;
    textAlign: TextAlign;
    lineHeight: number | string | Resource;
    textOverflow: TextOverflowOptions;
    fontFamily: string | Resource;
    maxLines: number;
    decoration: DecorationStyleInterface;
    letterSpacing: number | string;
    textCase: TextCase;
    baselineOffset: number | string;
    copyOption: CopyOptions;
    draggable: boolean;
    textShadow: ShadowOptions | Array<ShadowOptions>;
    heightAdaptivePolicy: TextHeightAdaptivePolicy;
    textIndent: Length;
    wordBreak: WordBreak;
    lineBreakStrategy: LineBreakStrategy;
    onCopy: ((breakpoints: string) => void);
    caretColor: ResourceColor;
    selectedBackgroundColor: ResourceColor;
    ellipsisMode: EllipsisMode;
    enableDataDetector: boolean;
    dataDetectorConfig: TextDataDetectorConfig;
    onTextSelectionChange: ((first: number, last: number) => void);
    fontFeature: string;
    privacySensitive: boolean;
    textSelectable: TextSelectableMode;
    editMenuOptions: EditMenuOptions;
    halfLeading: boolean;
    enableHapticFeedback: boolean;


}
export enum TextSpanType {
    TEXT,
    IMAGE = 1,
    MIXED = 2,
}
export enum TextResponseType {
    RIGHT_CLICK,
    LONG_PRESS = 1,
    SELECT = 2,
}
export interface TextOptions {
    controller: TextController;
}
